/* Includes ------------------------------------------------------------------*/
#include <Myapplication.h>

/* Private define-------------------------------------------------------------*/

/* Private variables----------------------------------------------------------*/
static void Fun_STA1(void);
static void Fun_STA2(void);
static void Fun_STA3(void);
static void Fun_STA4(void);
static void Fun_STA5(void);
/* Public variables-----------------------------------------------------------*/
STA_Machine_t STA_Machine = 
{
    STA1,
    Fun_STA1,
    Fun_STA2,
    Fun_STA3,
    Fun_STA4,
    Fun_STA5
};
/* Private function prototypes------------------------------------------------*/

/*
* @name   Fun_STA1
* @brief  状态函数1
* @param  None
* @retval None   
*/
static void Fun_STA1()
{
    HAL_Delay(500);                 //延时500ms
    LED.LED_Fun(LED1,LED_OFF);      //熄灭LED1
    LED.LED_Fun(LED2,LED_OFF);      //熄灭LED2
    LED.LED_Fun(LED3,LED_OFF);      //熄灭LED3
    STA_Machine.ucSTA_Machine_Status = STA2;      //切换到STA2状态
}

/*
* @name   Fun_STA2
* @brief  状态函数2
* @param  None
* @retval None   
*/
static void Fun_STA2()
{
    HAL_Delay(500);                 //延时500ms
    LED.LED_Fun(LED1,LED_ON);       //点亮LED1
    LED.LED_Fun(LED2,LED_OFF);      //熄灭LED2
    LED.LED_Fun(LED3,LED_OFF);      //熄灭LED3
    STA_Machine.ucSTA_Machine_Status = STA3;      //切换到STA3状态
}

/*
* @name   Fun_STA3
* @brief  状态函数3
* @param  None
* @retval None   
*/
static void Fun_STA3()
{
    HAL_Delay(500);                  //延时500ms
    LED.LED_Fun(LED1,LED_OFF);       //熄灭LED1
    LED.LED_Fun(LED2,LED_ON);        //点亮LED2
    LED.LED_Fun(LED3,LED_OFF);       //熄灭LED3
    STA_Machine.ucSTA_Machine_Status = STA4;      //切换到STA4状态
}

/*
* @name   Fun_STA4
* @brief  状态函数4
* @param  None
* @retval None   
*/
static void Fun_STA4()
{
    HAL_Delay(500);                  //延时500ms
    LED.LED_Fun(LED1,LED_OFF);       //熄灭LED1
    LED.LED_Fun(LED2,LED_OFF);       //熄灭LED2
    LED.LED_Fun(LED3,LED_ON);        //点亮LED3
    STA_Machine.ucSTA_Machine_Status = STA5;      //切换到STA5状态
}

/*
* @name   Fun_STA5
* @brief  状态函数5
* @param  None
* @retval None   
*/
static void Fun_STA5()
{
    HAL_Delay(500);                 //延时500ms
    LED.LED_Fun(LED1,LED_ON);       //点亮LED1
    LED.LED_Fun(LED2,LED_ON);       //点亮LED2
    LED.LED_Fun(LED3,LED_ON);       //点亮LED3
    STA_Machine.ucSTA_Machine_Status = STA1;      //切换到STA1状态
}

/********************************************************
  End Of File
********************************************************/
